Pulse code modulation (PCM) is the well-known process of sampling an analog signal at regular intervals, thereby representing and approximating the analog signal as a sequence of digital values. Differential pulse code modulation (DPCM) represents each successive value in a temporal or spatial sequence of values using the difference between the previous value and the sampled or desired value of the current point.
However, differential encoding can also be applied in multi-dimensional applications. For example, a previously-sampled signal (of one or more dimensions) can be characterized as a predictor of the current value of the signal, and the differences between the previous or predictor value, and the current value, can be expressed as differences. An example of such an approach is found in the Motion Picture Experts Group (MPEG) video encoding standards (MPEG-1, ISO/IEC 11172-2, and MPEG-2, ISO/IEC 13818-2, incorporated herein by reference.) In these standards, one method of compressing a motion video sequence is to utilize the content of one decoded field or frame of video as the predictor for a subsequent field or frame. The differences between the predictor and actual values can be expressed as an encoded set of difference values, the differences being applied to the predictor content to produce the updated content.
Computing the values of differential correctors to a predictor signal is a straight-forward process. For example, in differential coding of the difference between two images, if P[i][j] is the value of a previous decoded image pixel in the i-th row and j-th column, and S[i][j] is the sampled value for the current image, the difference value D[i][j] is computed as D[i][j]=S[i][j]−P[i][j]. The resulting difference value D[i][j] is then added to the predictor P[i][j] to produce the new sample value S[i][j]. In many differential encoding systems, the difference values can be expressed in a compact manner, thereby reducing the amount of data required to produce the updated signal. For instance, in an image coding system, the coefficients i and j may not run over the entire image, but only over the portion which is modified; for other pixel positions, the difference is zero. As an example, consider the case where a new sub-image is to be superimposed on a portion of a previous image. If the new sub-image is t rows tall and w columns wide, and the upper-left corner of the superimposed image is placed at row r and column c, only pixel positions in rows r through (r+w−1) and columns c through (c+w−1) can have non-zero difference values. In this case, an efficient coding scheme may be able to encode the differential corrector values more compactly owing to the multiplicity of zero values. The MPEG-1 and MPEG-2 video encoding standards incorporate such coding efficiency.
Note that in this example of updating a portion of an image, the difference values depend on the values of both the previously decoded (reference) image and the values of the new (replacement) sub-image. When computing the difference values, the specific S[i][j] pixel values used in the calculation will be based on the position (r,c) where the sub-image is superimposed on the reference image. This means that in general the encoded difference corrector will be unique to each possible placement position of the sub-image within the reference image.
Commonly in PCM systems, each digital sample has a finite resolution and limited range. For example, in the common sRGB image color coding standard (IEC 61966-2), each of the red, green and blue samples is limited to the range 0-255. By convention, when a differential corrector is added to a digital sample with finite range, if the resulting value falls outside the range, the value is clipped or limited to the valid range. This requirement is explicitly stated in the MPEG standards (e.g., ISO/IEC 11172-2 section 2.4.4.2.)